<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>对外测试</title>
</head>
<body>
<div style="padding:15px">
	<div class="layui-form" lay-filter="onlineProblemsForm" id="onlineProblemsForm">
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">搜索</label>
				<div class="layui-input-inline" style="width:300px">
					<input type="text" name="queryString" placeholder="请输入主题或者客户单位"
						autocomplete="off" class="layui-input">
				</div>
			</div>

			<div class="layui-inline">
				<button class="layui-btn layuiadmin-btn-list" lay-submit=""
					lay-filter="onlineProblemsFormsearch">
					<i class="layui-icon layui-icon-search"></i>
				</button>
			</div>
		</div>
	</div>
	<table class="layui-hide" id="onlineProblemsTable" lay-filter="onlineProblemsTable"></table>
	</div>
	<script type="text/javascript">
		var index;
		window.onlineProblemsTable = layui.table;
		var form = layui.form;
		var onlineProblemsForm = form.render(null,'onlineProblemsForm');
		var onlineProblemsNs = window.onlineProblemsTable.render({
			elem : '#onlineProblemsTable',
			url : window.basePath + '/order/findOnlieProblemsByworkNo?workNo='+window.empCode,
			headers: {"token" : window.token},
			method: "post",
			height : 280,
			cols : [ [{
				type:'checkbox'
			}, {
				field : 'request_number',
				width : 180,
				title : '单号'
			}, {
				field : 'title',
				width : 200,
				title : '主题'
			}, {
				field : 'company_name',
				width : 120,
				title : '客户单位'
			}, {
				field : 'company_phone',
				title : '客户联系电话',
				width : 120
			}, {
				field : 'company_address',
				title : '客户地址',
				width : 200
			} ] ],
			text : {
				none : '暂无相关数据' //默认：无数据。注：该属性为 layui 2.2.5 开始新增
			},
			page : true
		});
		
		//监听表格复选框选择
		onlineProblemsForm.on('submit(onlineProblemsFormsearch)',function(data){
			onlineProblemsNs.reload({
				where :{
					queryString:data.field.queryString
				},
				page:{
	            	curr:1
	            }
			});
			
			return false;
		});
	</script>
</body>
</html>